﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Xml.Linq;
using System.Collections.ObjectModel;
using LUStationery.DAO;

namespace LUStationery.Model
{
    public class Po 
    {
        private int _purchaseOrderID;

        public int PurchaseOrderID
        {
            get { return _purchaseOrderID; }
            set { _purchaseOrderID = value; }
        }
        private string _supplierCode;

        public string SupplierCode
        {
            get { return _supplierCode; }
            set { _supplierCode = value; }
        }
        private string _supplierName;

        public string SupplierName
        {
            get { return _supplierName; }
            set { _supplierName = value; }
        }
        private double _totalPrice;

        public double TotalPrice
        {
            get { return _totalPrice; }
            set { _totalPrice = value; }
        }
        private string _status;

        public string Status
        {
            get { return _status; }
            set { _status = value; }
        }
        private DateTime _expectedDate;

        public DateTime ExpectedDate
        {
            get { return _expectedDate; }
            set { _expectedDate = value; }
        }
        private DateTime _orderDate;

        public DateTime OrderDate
        {
            get { return _orderDate; }
            set { _orderDate = value; }
        }
        private DateTime _approveDate;

        public DateTime ApproveDate
        {
            get { return _approveDate; }
            set { _approveDate = value; }
        }
        private string _orderBy;

        public string OrderBy
        {
            get { return _orderBy; }
            set { _orderBy = value; }
        }
        private string _approveBy;

        public string ApproveBy
        {
            get { return _approveBy; }
            set { _approveBy = value; }
        }

        private string _deliverTo;

        public string DeliverTo
        {
            get { return _deliverTo; }
            set { _deliverTo = value; }
        }
        private string _attn;

        public string Attn
        {
            get { return _attn; }
            set { _attn = value; }
        }
        public Po() { }
        public Po(Supplier supplier, string deliverTo, string attn,DateTime expectedDate, string orderBy)
        {
            SupplierCode = supplier.SupplierCode;
            SupplierName = supplier.SupplierName;
            DeliverTo = deliverTo;
            Status = "pending";
            Attn = attn;
            ExpectedDate = expectedDate;
            OrderDate = System.DateTime.Now;
            OrderBy = orderBy;
        }
    }

    public class PoList : Collection<Po> { }

}
